package com.base.cn.platform.os.service.manage.user.exprule;

import com.base.cn.platform.os.service.FeignAuthConfig;
import com.base.cn.platform.os.service.manage.BaseService;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;


/**
 *  经验数据接口
 *
 * @author ll
 * @create 2018-04-09
 */
@FeignClient(value = BaseService.appName,configuration = FeignAuthConfig.class)
public interface CusUserExpRuleService extends BaseService {

    /**
     * 添加经验规则
     * @param cusUserExpRule 经验数据
     * @return
     */
    @RequestMapping(contextPath + "/user/saveUpdateCusUserExpRule")
    Map<String,Object> saveUpdateCusUserExpRule(@RequestBody Map<String, Object> cusUserExpRule);

    /**
     * 翻页搜索经验
     * @param cusUserExpRule
     * @param currentPage
     * @return
     */
    @RequestMapping(contextPath + "/user/queryCusUserExpRulePage")
    Map<String,Object> queryCusUserExpRulePage(@RequestBody Map<String, Object> cusUserExpRule,
                                               @RequestParam(value = "currentPage", required = false, defaultValue = "1") int currentPage);

    /**
     * 不翻页翻页搜索经验
     * @param cusUserExpRule
     * @return
     */
    @RequestMapping(contextPath + "/user/queryCusUserExpRuleList")
    List<Map<String,Object>> queryCusUserExpRuleList(@RequestBody Map<String, Object> cusUserExpRule,
                                                     @RequestParam("containColumns") List<String> containColumns);

    /**
     * 修改经验状态
     * @param id
     * @param status
     * @return
     */
    @RequestMapping(contextPath + "/user/updateCusUserExpRuleStatus")
    Map<String,Object> updateCusUserExpRuleStatus(@RequestParam("id") BigDecimal id,
                                                  @RequestParam("status") Integer status);


    /**
     * 根据Id搜索
     * @param id
     * @return
     */
    @RequestMapping(contextPath + "/user/queryCusUserExpRuleFindById")
    Map<String,Object> queryCusUserExpRuleFindById(@RequestParam("id") BigDecimal id,
                                                   @RequestParam("containColumns") List<String> containColumns);
}
